package yu.zhu.top;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import yu.zhu.top.config.CustomMultiThreadingConfig;
import yu.zhu.top.pojo.Movie;
import yu.zhu.top.service.CustomMultiThreadingService;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;


@SpringBootApplication
public class TopApplication implements CommandLineRunner {

    @Autowired
    private CustomMultiThreadingService service;

    public static void main(String[] args) {
        SpringApplication.run(TopApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        for (int i = 0; i < 5; i++) {
            service.TOP250();
        }

    }

}
